<script>
export default {
    name: 'TabContent',
    props:{
        datas:{
            type: Array,
            default: function(){
                return [];
            }
        }
    },
    render(){
        let content = this.datas.map((el,index)=>{
            return el.active ? el.$slots.default : null
        });
        return (
            <div class="tab-content">
                { content }
            </div>
        )
    }
}
</script>

<style lang="less" scoped>
    .tab-content{
        width:5.4rem;
        float:right;
        background: #fff;
        margin-top: 0.9rem;
    }
</style>